var id=0;
var img1=0;
var img2=0;
function ExpandCollapse(e,e1,e2)
{
    if (e.style.display ==""){
        e.style.display = "none";
        id=0;
        mouse_out(e,e1,e2);
    }
    else{
        e.style.display = "";
        if (id!=0){
            id.style.display="none";
            mouse_out(id,img1,img2);
        }
        id=e; 
        img1=e1;
        img2=e2;
        mouse_over(e1,e2);
    }
			
}

function ExpandCollapseKeyboard(e,e1,e2)
{
    if (event.keyCode == 33) //Page Up collapses
    {
        if (e.style.display == "")
            ExpandCollapse(e,e1,e2);
    }
    else if (event.keyCode == 34) //Page Down Expands
    {
        if (e.style.display == "none")
            ExpandCollapse(e,e1,e2);
    }
}
function mouse_over(e1,e2){
    e1.style.display="";
    e2.style.display="none";
}
function mouse_out(r,e1,e2){
    if (r.style.display=="none"){
        e2.style.display="";
        e1.style.display="none";
    }
}